﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebChat.Models
{
    public class ChannelFormViewModel
    {
        //
        // GET: /ChannelFormViewModel/

        private ChannelRepository channelRep;
        public Chatroom room { get; set; }
        public MultiSelectList user { get; private set; }
        private string[] selectedValues = null;

        public ChannelFormViewModel(Chatroom c) 
        {
            channelRep = new ChannelRepository();
            room = c;
            user = new MultiSelectList(channelRep.showAllUsers(),
                "UserId",
                "UserName",
                selectedValues);
        }

    }
}
